home *** CD-ROM | disk | FTP | other *** search
- /*
- TPSC32K用 外部Shell
-
- ぼかしユ-ティリティ
-
- */
-
- #define EGBSIZE 1536 // EGB用ワ-クサイズ
- #define MOSSIZE 4096 // マウス用ワ-クサイズ
- #define BOOL int // 論理判断の型宣言
- #define TRUE 1 // 真
- #define FALSE 0 // 偽
- #define MENUPAGE 0 // メニュ-ペ-ジ番号
- #define DRAWPAGE 0 // 描画ペ-ジ番号
- #define SCREEN 17 // 画面モ-ド
- #define DRAWWIDE 512 // 処理画面横サイズ
- #define DRAWHIDE 480 // 処理画面縦サイズ
- #define WHITE 0x7fFF
- #define FORECOLORNO 0
- #define BACKCOLORNO 1
- #define PAINTCOLORNO 2
- #define TRANSCOLORNO 3
- #define PSET 0
- #define PRESET 1
- #define OR 2
- #define AND 3
- #define XOR 4
- #define NOT 5
- #define MATTE 6
- #define PASTEL 7
- #define OPAQUE 9
- #define IMPSET 10
- #define IMPRSET 11
- #define IMPNOT 12
- #define MASKSET 13
- #define MASKRESET 14
- #define MASKNOT 15
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <malloc.h>
- #include <math.h>
- #include <egb.h>
- #include <mos.h>
- #include <loader.h> // コプロセス定義ファイル
-
- char EGB_work[EGBSIZE]; // EGBワ-クエリア
- char MOS_work[MOSSIZE]; // マウスワ-クエリア
-
- void nega(x1,y1,x2,y2)
- int x1,y1,x2,y2;
- {
- struct { short x1,y1,x2,y2; } par;
-
- EGB_writeMode(EGB_work,XOR);
- EGB_paintMode(EGB_work,0x20);
- EGB_color(EGB_work,PAINTCOLORNO,WHITE);
- par.x1 = x1; par.y1 = y1;
- par.x2 = x2; par.y2 = y2;
- EGB_rectangle(EGB_work,(char *)&par);
- EGB_writeMode(EGB_work,PSET);
- }
-
- main()
- {
- ADDRESS temp;
- int i,x,y;
- int page[2];
-
- pcl_get_dta(&temp);
-
- /* 画面・マウスの初期化 */
- EGB_getResolution(&page[0], &page[1]);
- if( page[0] == SCREEN ) {
- EGB_resolution(EGB_work,DRAWPAGE,page[0]|0x40); // Page0 Init
- EGB_displayPage(EGB_work,0,1); // 1page view
- MOS_start(MOS_work,MOSSIZE); // マウス初期化
- MOS_resolution(DRAWPAGE,page[0]);
-
- EGB_writePage(EGB_work,DRAWPAGE); // 描画ペ-ジを指定
- EGB_paintMode(EGB_work,0x22); // ペイントモ-ドを指定
- EGB_color(EGB_work,0,WHITE); // ドットの色を指定
- EGB_writeMode(EGB_work,0);
-
- /* 処理開始 */
- nega(0,0,DRAWWIDE-1,DRAWHIDE-1);
-
- /* 子プロセスの終了処理 */
- MOS_end();
- }
-
- pcl_exit(0);
- return (0);
- }
-